home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form frmNode
- Caption = "SuperChat"
- ClientHeight = 2145
- ClientLeft = 435
- ClientTop = 2295
- ClientWidth = 7065
- Height = 2550
- Icon = NODE.FRX:0000
- Left = 375
- LinkTopic = "Form1"
- MDIChild = -1 'True
- ScaleHeight = 2145
- ScaleWidth = 7065
- Top = 1950
- Visible = 0 'False
- Width = 7185
- Begin TextBox txtNode
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 1485
- Left = 0
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 0
- Top = 0
- Width = 7095
- End
- Begin dsSocket dssNode
- DataSize = 2048
- Left = 120
- Linger = 0 'False
- LocalPort = 0
- RemoteDotAddr = ""
- RemoteHost = ""
- RemotePort = 0
- ServiceName = ""
- Timeout = 0
- Top = 1560
- End
- DefInt A-Z
- Sub dssNode_Exception (ErrorCode As Integer, ErrorDesc As String)
- '-- Have we disconnected?
- If ErrorCode = DSSOCK_DISCONNECTED Then
- '-- Yes
- Unload Me
- End If
- End Sub
- Sub dssNode_Receive (ReceiveData As String)
- '-- We've received data!
- If Len(ReceiveData) > 5 Then
- '-- Is this the header?
- If Left$(ReceiveData, 5) = "NAME=" Then
- '-- Yes. Parse out the name
- Tilde = InStr(ReceiveData, "~")
- LenName = Tilde - 6
- CallerName$ = Mid$(ReceiveData, 6, LenName)
- Caption = CallerName$
- If Len(ReceiveData) > Tilde Then
- ReceiveData = Mid$(ReceiveData, Tilde + 1)
- ElseIf Len(ReceiveData) = Tilde Then
- ReceiveData = ""
- End If
- End If
- End If
- '-- Is the receieved text getting to large?
- If Len(txtNode) > 15000 Then
- '-- Yes. Trim it off
- txtNode = Right(txtNode, 5000)
- End If
- '-- Set the caret to the end of the last character.
- txtNode.SelStart = Len(txtNode)
- '-- Add the new text
- txtNode.SelText = ReceiveData
- End Sub
- Sub Form_Resize ()
-
- '-- Resize the text box to fit the client area.
- txtNode.Width = Me.ScaleWidth
- txtNode.Height = Me.ScaleHeight
- End Sub
- Sub Form_Unload (Cancel As Integer)
- '-- Close the socekt connection if
- ' its open
- On Error Resume Next
- dssNode.Action = DSSOCK_CLOSE
- End Sub
-